import { PropsWithChildren } from 'react'
import { useLaunch } from '@tarojs/taro'
import store from "@/stores";
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';
import {Provider} from "react-redux";
import './app.scss'


// const persisted = persistStore(store)
function App({ children }: PropsWithChildren<any>) {
  useLaunch(() => {
    console.log('App launched.')
  })

  // children 是将要会渲染的页面
  return (
    <Provider store={store}>
      {/*<PersistGate loading={null} persistor={persisted}>*/}
        {children}
      {/*</PersistGate>*/}
    </Provider>
  )
}



export default App
